import { RouteRecordRaw } from "vue-router";

import error from "./error";
import demo from "./demo";
import system from "./system";

export default <RouteRecordRaw[]>[
    {
        path: '/login',
        name: 'Login',
        component: () => import(/* webpackChunkName: "router" */'@/views/system/Login.vue'),
    },
    {
        path: '/logout',
        name: 'Logout',
        redirect: { name: 'Login' },
    },
    {
        path: '/',
        name: 'layout',
        component: () => import(/* webpackChunkName: "router" */'@/layouts/AdminLayout.vue'),
        children: [
            {
                path: '',
                name: 'Home',
                component: () => import(/* webpackChunkName: "router" */'@/views/dashboard/Dashboard.vue'),
                meta: {
                    title: '仪表盘'
                }
            },
            {
                path: ':pathMatch(.*)*',
                name: 'NotFound',
                component: () => import(/* webpackChunkName: "router" */'@/views/error/404.vue'),
                meta: {
                    title: 'not found'
                }
            },
        ]
    },
    ...demo,
    ...error,
    ...system,

]
